
// 地图属性查询result转为表格数据
function transformData(result) {
    var data = [];
  
    // 获取属性字段名称
    var fldName = result.AttStruct.FldName;
  
    // 遍历要素数组
    for (var i = 0; i < result.SFEleArray.length; i++) {
      var feature = result.SFEleArray[i];
      var attValue = feature.AttValue;
  
      // 将每个要素的属性值添加到对象中
      var obj = {};
      obj["FID"]=feature.FID
      for (var j = 0; j < fldName.length; j++) {
        obj[fldName[j]] = attValue[j];
      }
      
  
      data.push(obj);
    }
  
    return data;
  }

  export  {transformData}